package com.yuuzai.openworld.framework.action;

import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

import com.yuuzai.openworld.OpenWorldObject;

public abstract class ActionContext extends OpenWorldObject {

	private List<ActionExecutionException> exceptions;

	public Iterable<ActionExecutionException> getExceptions() {
		return Collections.unmodifiableList(this.exceptions);
	}

	public void setException(ActionExecutionException value) {
		this.exceptions.add(value);
	}
	
	public ActionContext() {
		this.exceptions = new LinkedList<ActionExecutionException>();  
	}

}
